﻿using System.Collections.Generic;
using System.IO;

namespace IniFileManager
{
	/// <summary>
	/// Class containing information about physical layout of ini file.
	/// </summary>
	sealed internal class IniFileStructure
	{
		private List<IniFileStructureRow> rows;
		internal IniFileStructure()
		{
			this.rows = new List<IniFileStructureRow>();
		}

		internal void AddRow( IniFileStructureRow row )
		{
			this.rows.Add( row );
		}

		internal void WriteSelf( TextWriter outputWriter )
		{
			foreach( IniFileStructureRow item in this.rows )
			{
				outputWriter.WriteLine( item.WriteSelf() );
			}
		}
	}
}
